home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / sw_42a.zip / SW-42.DOC < prev    next >
Text File  |  1992-02-29  |  49KB  |  1,099 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                                         
  17.  
  18.                    ╔═══════════════════════════════════╗  
  19.                    ║                                   ╟─┐
  20.                    ║               SW.EXE              ║ │
  21.                    ║       Batch File Enhancement      ║ │
  22.                    ║            Version 4.2a           ║ │
  23.                    ║                                   ║ │
  24.                    ╚═╤═════════════════════════════════╝ │
  25.                      └───────────────────────────────────┘
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.                               February 29, 1992
  57.  
  58.                                  SW.EXE 4.2a
  59.                                  Warren Small
  60.                                    (c) 1992
  61.  
  62.  
  63. INTRODUCTION  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  64.      SW.EXE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  65.      DI.EXE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  66.      Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    1
  67.      OPTIONS  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    2
  68.      NOTES ON DOS . . . . . . . . . . . . . . . . . . . . . . . . . . . .    2
  69.  
  70. WINDOW APPEARANCE . . . . . . . . . . . . . . . . . . . . . . . . . . . .    3
  71.      /F#  Foreground Color   /B#  Background Color  . . . . . . . . . . .    3
  72.      COLOR VALUES . . . . . . . . . . . . . . . . . . . . . . . . . . . .    3
  73.      /L#  Window Border (Lines) . . . . . . . . . . . . . . . . . . . . .    3
  74.      /S#  Shadows . . . . . . . . . . . . . . . . . . . . . . . . . . . .    3
  75.      /W   Wide Edge . . . . . . . . . . . . . . . . . . . . . . . . . . .    3
  76.      /2   Double Spacing   /0  No Margin  . . . . . . . . . . . . . . . .    3
  77.      /R#  Row   /C#  Column . . . . . . . . . . . . . . . . . . . . . . .    4
  78.      /H#  Here  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    4
  79.      /D   Draw Window . . . . . . . . . . . . . . . . . . . . . . . . . .    4
  80.      /Z   Zoom Window . . . . . . . . . . . . . . . . . . . . . . . . . .    4
  81.  
  82. TEXT APPEARANCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    5
  83.      /T#  Text Color   /G#  Global Text Color . . . . . . . . . . . . . .    5
  84.      /E#  Enhanced Text Color . . . . . . . . . . . . . . . . . . . . . .    5
  85.      /M#  Border Message  . . . . . . . . . . . . . . . . . . . . . . . .    5
  86.      /J#  Justify . . . . . . . . . . . . . . . . . . . . . . . . . . . .    5
  87.  
  88. SCREEN APPEARANCE . . . . . . . . . . . . . . . . . . . . . . . . . . . .    6
  89.      /K#  Klear Screen (with optional Fill Character) . . . . . . . . . .    6
  90.      /K#  Klear Screen, set Foreground Color  . . . . . . . . . . . . . .    6
  91.      /K#  Klear Screen (with optional Fill String)  . . . . . . . . . . .    6
  92.      /O#  Outside Edge (Screen Border)  . . . . . . . . . . . . . . . . .    6
  93.  
  94. OTHER SWITCHES  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    7
  95.      /P#  Pause . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    7
  96.      /Q   Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    7
  97.      /I#  User Input  . . . . . . . . . . . . . . . . . . . . . . . . . .    8
  98.      /N#  Input Line Number . . . . . . . . . . . . . . . . . . . . . . .    9
  99.      /U   Input Uppercase . . . . . . . . . . . . . . . . . . . . . . . .    9
  100.      /D   Draw Window . . . . . . . . . . . . . . . . . . . . . . . . . .    9
  101.      /ch  Fill Line . . . . . . . . . . . . . . . . . . . . . . . . . . .    9
  102.      /A#  Alert   /A#,#  Alert with Frequency, Duration . . . . . . . . .   10
  103.  
  104. DEFAULTS  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   11
  105.  
  106. SCREEN DEFINITIONS  . . . . . . . . . . . . . . . . . . . . . . . . . . .   12
  107.  
  108. TIPS AND TRICKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   14
  109.  
  110. DI.EXE - Disk Information . . . . . . . . . . . . . . . . . . . . . . . .   15
  111.  
  112. SW.EXE History  . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   17
  113.  
  114.                                  SW.EXE 4.2a
  115.                                  Warren Small
  116.                                    (c) 1992
  117.  
  118.                                  INTRODUCTION
  119.  
  120.      The batch  file language for the IBM PC could be  described as useful but
  121. not much  else. It is lacking  a great deal in  terms of  flexibility. These 2
  122. utilities, SW.EXE  and DI.EXE, attempt to make batch files  much more powerful
  123. and at the same time make them nice to look at.
  124.  
  125.      SW.EXE  grew out of  my hatred for  the ECHO  statement. Any  time that I
  126. needed  to say something  to the user, ECHO was the  only way. It was slow and
  127. difficult  to make  look halfway  decent. And  if I  wanted color,  there  was
  128. ANSI.SYS...
  129.  
  130.      DI.EXE was introduced  with SW 4.1 as a  response to users  who have been
  131. utilizing SW as an install  tool for software distribution. DI allows interro-
  132. gation of the disk drives to determine if they are ready for  whatever use you
  133. had in mind. This way you  can avoid hardware  errors which can pop up in  the
  134. middle of your nice SW screens. See Page 15 for the details on using DI.
  135.  
  136.      SW.EXE will display up to  20 lines of text in a window using either  its
  137. command  line format  or an  external  'Screen  Definition' file.  With either
  138. method, the color of each line can be  defined separately or as a group. Also,
  139. the colors for  the window, its border, the  screen background and its  border
  140. can  be specified. Five  different window borders are  possible and the screen
  141. background can be filled with characters or complete strings.
  142.  
  143.      SW.EXE  also provides  functions  for  retrieving  input from  the  user,
  144. either single keystrokes or strings, controlling batch  file execution through
  145. branching and alerting the user with various sounds or even simple tunes.
  146.  
  147. Command Line Syntax:
  148.  
  149.        SW [options] "text1" [options] ["text2"] [options] ["text3"] ...
  150.  
  151. External File Syntax:
  152.  
  153.                              SW @filename [label]
  154.  
  155.      The  biggest advantage to using  the external file approach  is that more
  156. than  one window  can be displayed  with only  one call to  SW! This can  be a
  157. tremendous speed advantage if the batch file is being run from a floppy  disk.
  158. The screen definition can  also be written into  the batch file  that utilizes
  159. it so that  disk space is used  optimally. The optional  label shown  above is
  160. used to mark different definitions within the same file. The demo batch  file,
  161. SW42DEMO.BAT, contains  many examples of  both methods. See  page 12 for  more
  162. information.
  163.  
  164.      On the  next page is a  list of the various  switches along with a  short
  165. description  of what  each does. This  list appears on  the screen when  SW is
  166. called without parameters.
  167.  
  168.  
  169.  
  170.                                     Page 1
  171.  
  172.                                  SW.EXE 4.2a
  173.                                  Warren Small
  174.                                    (c) 1992
  175.  
  176.                                    OPTIONS
  177.  
  178.  Window:  /f# Foreground (0-15)  /b# Background (0-7)  /l# Border (0-5)
  179.           /s# Shadow (1-4)  /w Wide Edge  /2 Double Spacing  /0 No Margin
  180.           /r# Row (1-25)  /c# Col (1-80)  /h# here + #  /d Draw  /z Zoom
  181.  Text:    /t#|g# Text (0-15)  /e# Enhanced Text  /m# Border Msg  /j# Justify
  182.  Screen:  /k#[ ] Clear screen with color (0-7) [char]  /o# Outside edge
  183.  Other:   /p#[-] Pause  /a#[,#] Alert (0-9) /q... Query  /char Fill Line
  184.           /i# User Input  /n# Input Line  /u Uppercase
  185.  
  186.      Switches can be  in almost any order, upper or lower case  (except /q and
  187. /i, see page 7), and a space is required between each.
  188.  
  189.                                  NOTES ON DOS
  190.  
  191.      - There is a limit to  the length of  a command line whether it is  typed
  192. directly from the DOS prompt or  inside a batch file. This  limit is 128 char-
  193. acters. Anything past that point will be ignored.
  194.  
  195.      - The Query feature  described on page 7 makes use of Errorlevel codes to
  196. allow the batch file to determine which key  has been pressed. A series  of IF
  197. ERROR